<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <script>
    'use strict';
    console.log('a');
    console.log("a");
    console.log("a \' \"");
    //tab键上面的键
    var msg = `hello abc
    你好！
    可以`;
    console.log(msg);
    let message = `你好！ ${msg}`;
    console.log(message);
    /**
    var person = {
        name:"David Niu",
        age: 3,
        score:98,
        email:"davidniu@hotmail.com"
    }
     var a = 3;
    while(a<100){
        a= a+1;
        console.log(a);
    }
    for(let i=0;i<100;i++){
        console.log(i);
    }
    var age = [1,2,3,4,5,6,7,8,900,12];
    //age.forEach(function (value){
      //  console.log(value);
    //});
    //num是age的索引
    for(var num in age){
        console.log(age[num]);
    }*/
    //ES6 map set
    //学生的名字和成绩
    //var names =['Tom','Jack','Scott'];
    //var scores = [100,90,80];
    var names = new Map([['Tom',100],['Jack',90],['Scott',80]]);
    var name =names.get('Tom');
    console.log(name);
    names.set('Smith',1234567);
    var set = new Set([1,2,3,11,22,33]);
    set.add(4);
    set.delete(11);
    console.log(set.has(22));
    var mySet = new Set([2,1,1,1,1]);
    console.log(mySet);
    var arr = [1,2,3,4,5,6,7,8,900,12];
    for(var x of arr){
        console.log(x);
    }
    for(let x of names){
        console.log(x);
    }
    for(let x of set){
        console.log(x);
    }
  </script>
</head>
<body>

</body>
</html>